package com.kugua.zfms.resilience;

public class CircuitBreakerDemo {

    public static void main(String[] args) {

        // Create a CircuitBreaker (use default configuration)
//        CircuitBreakerConfig circuitBreakerConfig = CircuitBreakerConfig
//                .custom()
//                .enableAutomaticTransitionFromOpenToHalfOpen()
//                .build();
//        CircuitBreaker circuitBreaker = CircuitBreaker
//                .of("backendName",circuitBreakerConfig);
//        String result = circuitBreaker.executeSupplier(() -> backendService.doSomethingWithArgs("world"));
//        System.out.println(result);
    }
}
